<template>
  <div class="menu">
    <xTable :tableList="menuList" v-bind="tableConfig"></xTable>
  </div>
</template>

<script setup lang="ts">
import { getAllMenu } from "@/api"

import { ref } from "vue"

import xTable from "@/components/table"

import { tableConfig } from "./config/table.config"

const searchData = ref({
  psize: 10,
  page: 1,
  name: "",
  create_time: ""
})
const menuList = ref([])
const total = ref(0)
const fecthList = async () => {
  const menu = await getAllMenu(searchData.value)
  menuList.value = menu.data.data
  total.value = menu.data.count
  console.log(menu.data)
}
fecthList()
</script>

<style scoped>
</style>
